import fetch from '@/utils/fetch'

var qs = require('qs')

export function GetPermissionByRoleId(roleId) {
  return fetch({
    url: '/rolePermission/getPermissionByRoleId',
    method: 'get',
    params: { roleId }
  })
}

export function UpdateRolePermission(roleId, addPermissionId, delPermissionId) {
  return fetch({
    url: '/rolePermission/updateRolePermission',
    method: 'post',
    data: JSON.stringify({roleId, addPermissionId, delPermissionId}),
    headers: {'Content-Type': 'application/json;charset=UTF-8'}

  })
}
